/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package server;

import beans.UserBean;
import database_beans.Student;
import database_beans.Zaposleni;
import java.io.Serializable;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.SessionScoped;

/**
 *
 * @author stefan
 */
@ManagedBean
@SessionScoped
public class PiaSession implements Serializable{
    
    private static PiaSession instance;
    
    private Zaposleni userZaposlen;
    private Student userStudent;
    private UserBean user;

    public PiaSession() {
    }
    
    public static synchronized PiaSession getInstance(){
        if(instance == null){
            instance = new PiaSession();
        }
        return instance;
    }

    public Zaposleni getUserZaposlen() {
        return userZaposlen;
    }

    public void setUserZaposlen(Zaposleni userZaposlen) {
        this.userZaposlen = userZaposlen;
    }

    public Student getUserStudent() {
        return userStudent;
    }

    public void setUserStudent(Student userStudent) {
        this.userStudent = userStudent;
    }

    public UserBean getUser() {
        return user;
    }

    public void setUser(UserBean user) {
        this.user = user;
    }

    
    
    
    
}
